home *** CD-ROM | disk | FTP | other *** search
/ IBM OEM Software Product … CD For PC Manufacturers / IBM OEM Software - Product Sampler CD for PC Manufacturers.iso / InternetIntranets / Notes / INSTALL.DSK / MAIN.LSS < prev    next >
Text File  |  1997-08-20  |  83KB  |  2,204 lines

  1. ''/*********************************************************************
  2. ''
  3. ''   Module Name:   main.lss
  4. ''
  5. ''   Module Code:   TOOLKIT
  6. ''
  7. ''   Author:  Marcel Meth
  8. ''
  9. ''   Creation Date:  Aug 31, 1993
  10. ''
  11. ''   Copyright Lotus Development Corporation, (c) 1991
  12. ''
  13. ''
  14. ''   Description: 
  15. ''     Lotus script file for common install
  16.  
  17. ''     If you are trying to create an automated install, you need to
  18. ''     remove or comment out the Calls that bring up dialogs and
  19. ''     ensure that the symbols have valid values.
  20. ''     See "AUTOMATE" comments throughout the  code.
  21. ''     You should be able to easily automate a simple COMPLETE install.
  22. ''
  23. ''   SUGGESTION: You should be able to tailor an install to you users by
  24. ''               having shell variables setup for them and using the
  25. ''               the lotus script "ENVIRON$" variable.
  26. ''                e.g. suppose the user has the following line in their autoexec.bat
  27. ''                   set NAME=Marcel
  28. ''                then you can pick it up with:
  29. ''                   name$ = ENVIRON$("NAME")
  30. ''
  31. ''   The following diagram illustrates the basic execution path(s)
  32. ''   available in this script.
  33. ''
  34. ''   InitInstall
  35. ''   |
  36. ''   WELCOME DIALOG (SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$)
  37. ''   |
  38. ''   SERVERorDISTRIBUTION DIALOG (SYM_NETWORK$)
  39. ''   |
  40. ''   IF SMARTSUITE THEN   SUITE DIR DIALOG (SYM_BASEDIR$)
  41. ''   |
  42. ''   SELECT based on SYM_NETWORK$
  43. ''      |
  44. ''      gSTANDARD--.....
  45. ''      |        
  46. ''      gSERVER--.....
  47. ''      |        
  48. ''      gNODE--.....
  49. ''      |        
  50. ''      gDISTRIBUTION--.....
  51. ''
  52. ''     The main Drive for all Installs
  53. ''  
  54. ''   Tabs: 3 (In Brief do tabs 4 7)
  55. ''
  56. ''   Additional authors:  Mariana Zgripcea,   Dave Dupre,
  57. ''                        Thangarag Veerapan, Christopher Moy
  58. ''
  59. ''   Change History:
  60. ''   $Log:   //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/main___@.lss  $
  61. '' 
  62. ''    Rev 1.176.1.0   15 Nov 1995 17:11:08   mhishinu
  63. '' Merged GC5 into FE5
  64. '' 
  65. ''    Rev 1.176   17 Oct 1995 16:08:28   jdonohue
  66. '' Changed logic for COMPONENTSDIR and LOTUSAPPDIR defaults from cinstall.ini
  67. '' 
  68. ''    Rev 1.175   17 Oct 1995 13:14:54   jdonohue
  69. '' Fixed wrong ini section reference, moved dialog code
  70. '' 
  71. ''    Rev 1.174   13 Oct 1995 14:43:56   jdonohue
  72. '' Added call to Lot_RefreshLocalComponentDir
  73. '' 
  74. ''    Rev 1.173   03 Oct 1995 16:42:18   tveerapp
  75. '' Fixed spr#TVEN2WNS5V. Removed the conditional check for calling into the 
  76. '' product UI functions only during custom install. Lot_CallProductFunctions(UI)
  77. '' will now be called for all types of installs (default,min and custom). This
  78. '' check was removed from case gSTANDARD and case gSERVER. 
  79. '' 
  80. ''    Rev 1.172   27 Sep 1995 17:03:42   jdonohue
  81. '' Set server defaults for LOTUSAPPDIR and COMPONENTSDIR in cinstall.ini found
  82. '' 
  83. ''    Rev 1.171   27 Sep 1995 14:48:02   jdonohue
  84. '' Language install message always based on SYM_REG_PRODUCTNAME$ (prod #1)
  85. '' Set SYM_INSTALLKINDS$ as well as SYM_INSTALLKIND$
  86. '' 
  87. ''    Rev 1.170   26 Sep 1995 16:10:12   jdonohue
  88. '' For suite language install, dialog says "smart Suite" in product field
  89. '' Fixed error on server/language install
  90. '' 
  91. ''    Rev 1.169   25 Sep 1995 15:29:38   jdonohue
  92. '' Call all product functions for InitLanguage
  93. '' 
  94. ''    Rev 1.168   21 Sep 1995 16:22:00   jdonohue
  95. '' Moved resetting of gINSTALLINI$ for output after reading of cinstall.ini file
  96. '' 
  97. ''    Rev 1.167   21 Sep 1995 12:28:34   jdonohue
  98. '' Don't reset gINSTALLINI$ for server language install
  99. '' 
  100. ''    Rev 1.166   13 Sep 1995 14:47:22   tveerapp
  101. '' Fixed the logic in SetTheBase. The registry is read only for a std./node 
  102. '' installs.
  103. '' 
  104. ''    Rev 1.165   13 Sep 1995 14:44:46   jdonohue
  105. '' Moved check for server language install
  106. '' 
  107. ''    Rev 1.164   12 Sep 1995 13:21:38   jdonohue
  108. '' Popup message for server language install
  109. '' 
  110. ''    Rev 1.163   12 Sep 1995 10:53:14   tveerapp
  111. '' Added Lo_SaveFeaturesInInstNodeIni() for a node install. This records
  112. '' uinstall information in cinstnod.ini
  113. '' 
  114. ''    Rev 1.162   08 Sep 1995 16:56:02   tveerapp
  115. '' Fixed spr#KHAN2VUQVY,the change is in SetTheBase for automation.
  116. '' 
  117. ''    Rev 1.161   07 Sep 1995 14:51:54   tveerapp
  118. '' Moved the setting of INSTDIR duringa language server install to Inst.lss
  119. '' to fix spr#WEDS2VNRDZ
  120. '' 
  121. ''    Rev 1.160   02 Sep 1995 15:29:50   amontalv
  122. '' Added check at beginning, right after initialization to determine if we have
  123. '' enough priviledges to install.
  124. '' 
  125. ''    Rev 1.159   31 Aug 1995 11:42:50   jdonohue
  126. '' Added code to check that the parent directory obtained from the registry is
  127. '' a valid drive, and if not, uses default
  128. '' 
  129. ''    Rev 1.158   22 Aug 1995 16:13:46   tveerapp
  130. '' For a standalone and node language installs don not reset the product symbols
  131. '' during automation.
  132. '' 
  133. ''    Rev 1.157   22 Aug 1995 13:52:42   jdonohue
  134. '' SetBaseSymbols now looks in registry under ..\lotus\Components for default
  135. '' 
  136. ''    Rev 1.156   17 Aug 1995 14:53:26   jdonohue
  137. '' Added functions to recognize and handle node install from secondary server
  138. '' language
  139. '' 
  140. ''    Rev 1.155   17 Aug 1995 14:36:28   callanan
  141. '' Set the bitmap display mode for billboards
  142. '' 
  143. ''    Rev 1.154   17 Aug 1995 14:03:22   callanan
  144. '' Changed the default way to handle bitmaps in dialogs
  145. '' 
  146. ''    Rev 1.153   15 Aug 1995 16:40:16   mmeth
  147. '' Part 2 of SPR# RMOO2UPTZD
  148. '' In SUB ConfigureAUTOEXEC I have added a check as to which dialog should be
  149. '' posted.  If there were files marked "SYSTEM", that were busy, then
  150. '' I send a message to the install.exe's window to reboot.
  151. '' This of course is only true, if the user chooses to reebot.
  152. '' 
  153. ''    Rev 1.152   15 Aug 1995 07:53:04   jdonohue
  154. '' For a node install, if main product and install directories differ, sets
  155. '' main directory to parent of install (secondary language install)
  156. '' 
  157. ''    Rev 1.151   14 Aug 1995 11:32:12   jdonohue
  158. '' Added code to handle server language install
  159. '' 
  160. ''    Rev 1.150   14 Aug 1995 10:48:02   callanan
  161. '' Modify SYM_CUSTOM$ to keep track of where we are in install, to decide how we display bitmaps in dialogs
  162. '' 
  163. ''    Rev 1.149   09 Aug 1995 13:48:06   callanan
  164. '' Created global SYM_CUST which keeps track of when we are in the Custom dialog
  165. '' so we can display bitmaps correctly.
  166. '' 
  167. ''    Rev 1.148   04 Aug 1995 14:54:26   amontalv
  168. '' Added quotes around the directory name in the lsirun like written to install.lst
  169. '' 
  170. ''    Rev 1.147   02 Aug 1995 17:45:26   tveerapp
  171. '' Added Lot_AutoSetSrvOptions to gSERVER.
  172. '' 
  173. ''    Rev 1.146   02 Aug 1995 16:28:04   jdonohue
  174. '' Changed calling method for InitLanguage
  175. '' 
  176. ''    Rev 1.145   27 Jul 1995 15:47:00   glutz
  177. '' Took out some print statements.
  178. '' 
  179. ''    Rev 1.144   27 Jul 1995 13:33:28   glutz
  180. '' Added cost of unc files to NumberOfBytesPerBillbd.
  181. '' 
  182. ''    Rev 1.143   27 Jul 1995 10:11:16   amontalv
  183. '' Put a check for the new shell around the CreateProgmanGroup call -- all three
  184. '' of them.  
  185. '' 
  186. ''    Rev 1.142   10 Jul 1995 14:33:06   glutz
  187. '' If CheckForSpace fails return to Select Parent dir dialog.
  188. '' 
  189. ''    Rev 1.141   07 Jul 1995 16:47:32   mzgripce
  190. '' if lotusappdir is deleted before the node install put an error and exit
  191. '' 
  192. ''    Rev 1.140   28 Jun 1995 11:42:28   tveerapp
  193. '' Added check to customize shared components for a custom install only.
  194. '' 
  195. ''    Rev 1.139   22 Jun 1995 15:34:16   tveerapp
  196. '' Added logic to Welcome code.Install ends when the welcome dialogs returns
  197. '' gBACK$.
  198. '' 
  199. ''    Rev 1.138   21 Jun 1995 20:21:16   amontalv
  200. '' Attempt to get User name and Company from 4 different places.  The original, from
  201. '' the Windows registry entry for Windows, the Windows registry location for Windows NT
  202. '' and using GetUserName as last resort.
  203. '' 
  204. ''    Rev 1.137   21 Jun 1995 11:33:36   tveerapp
  205. '' When an STFQUIT error is raised, check for automation by getting the
  206. '' SYM_AUTOMATIONINST value. Script does not store the automation$ variable's
  207. '' value.
  208. '' 
  209. ''    Rev 1.136   20 Jun 1995 13:48:24   tveerapp
  210. '' Changed the call from Lot_AutoGetProgramGroup to Lot_GetProgramGroupOrFolder
  211. '' 
  212. ''    Rev 1.135   19 Jun 1995 17:10:30   tveerapp
  213. '' During automation allow the defaultreg function to be called for the 
  214. '' 1st product(similar to the regular install).
  215. '' Should fix spr#KHAN2T2PCQ.
  216. '' 
  217. ''    Rev 1.134   12 Jun 1995 12:46:12   amontalv
  218. '' Added code to Server and node to display folder instead of program group if
  219. '' on Win95.  The code doesn't completely work yet as I'm waiting for some UI
  220. '' issues to be worked out
  221. '' 
  222. ''    Rev 1.133   08 Jun 1995 17:08:58   tveerapp
  223. '' Fixed spr# CCOL2NULJ2. Moved the AutoGetProductDestDir function after
  224. '' smartsuite appselection for a standard and node install.
  225. '' 
  226. ''    Rev 1.132   08 Jun 1995 12:33:02   tveerapp
  227. '' Modified ConfigureAUTOEXEC. The autoexec modification code has been remmed
  228. '' out. This sub routine now brings up only the success dilaog.
  229. '' This should fix spr#KHAN2SKKQZ.
  230. '' 
  231. ''    Rev 1.131   07 Jun 1995 16:30:22   amontalv
  232. '' Changed the Win95 start folder so that it initializes
  233. '' earlier in the program.  This should make automation
  234. '' easier to implement for it.  There are still a couple of
  235. '' bugs that I need to work out, but I feel that I should
  236. '' check what I have now.
  237. '' 
  238. ''    Rev 1.130   06 Jun 1995 15:53:30   amontalv
  239. '' We are experiencing problems with LotusScript when we fill buffers with
  240. '' nulls and then pass them to C routines.  For the time being, it is suggested
  241. '' that we fill our buffers with spaces.  To this end (and to make it
  242. '' easier to change back later) I have created a small LotusScript routine
  243. '' named CreateBuffer.  You use it any time you ordinarily would use
  244. '' STRING$(num, 0).  CreateBuffer() just needs the num, it decides what to
  245. '' fill the buffer with (sorry about the grammer).  Right now it fill the
  246. '' buffer with spaces.  Later we will change it back to nulls.  Also look
  247. '' at the routine NullTrim().  It will get rid of final nulls and spaces.
  248. '' You can use this when getting a buffer that has been changed or filled
  249. '' in a external C routine.
  250. '' 
  251. ''    Rev 1.129   05 Jun 1995 18:11:54   tveerapp
  252. '' Changed AutoSetPArentCompDirs to AutoSetParentDir
  253. '' 
  254. ''    Rev 1.128   05 Jun 1995 16:37:12   amontalv
  255. '' Made changes for migrating to LotusScript version 3.0.37.
  256. '' 
  257. ''    Rev 1.127   01 Jun 1995 11:11:34   amontalv
  258. '' Added API function CreateLink to create shortcuts.  Also added functions
  259. '' to save and get the link path to support the CreateLink.  I also changed
  260. '' the startup program folder code to use the default dialog proc and changed
  261. '' the default dialog proc to process directory trees.
  262. '' 
  263. ''    Rev 1.126   30 May 1995 15:42:34   amontalv
  264. '' Made a new function PopupWithFunction.  PopupModalDlg now calls this.  Needed to
  265. '' do this to call dialog with my own dialog function.
  266. '' 
  267. ''    Rev 1.125   30 May 1995 09:25:28   amontalv
  268. '' Added back my changes.  Had not made changes to setupapi.lss to declare
  269. '' functions.
  270. '' 
  271. ''    Rev 1.124   26 May 1995 14:36:44   cmoy
  272. '' rolled back Andy's changes to revision 1.122
  273. '' 
  274. ''    Rev 1.122   22 May 1995 23:32:20   amontalv
  275. '' Added browse for Win 95 program folder.
  276. '' 
  277. ''    Rev 1.121   22 May 1995 09:28:22   mzgripce
  278. '' remove the function IsLotusappPromptNeeded() and the calls to it and remove
  279. '' the tags NODEPROMPTLOTUSAPP: STDSUITPROMPTLOTUSAPP: AND STDPROMPTLOTUSAPP
  280. '' FIXING THE GOTOs TO THEM 
  281. '' 
  282. ''    Rev 1.120   18 May 1995 12:17:36   tveerapp
  283. '' Added call AutoSetParentCompDirs inside SetTheBaseSymbol for a single
  284. '' product automated install.
  285. '' 
  286. ''    Rev 1.119   18 May 1995 12:07:26   mzgripce
  287. '' set default for baseDir to lotus and remove initlang... and use language 
  288. '' 
  289. ''    Rev 1.118   18 May 1995 09:54:48   mzgripce
  290. '' display userUI in server install only in customize case.
  291. '' 
  292. ''    Rev 1.117   17 May 1995 17:56:26   mzgripce
  293. '' display user UI only in customize for standalone install
  294. '' 
  295. ''    Rev 1.116   17 May 1995 08:54:12   jdonohue
  296. '' Added call to InitLanguage
  297. '' 
  298. ''    Rev 1.115   16 May 1995 13:45:30   mzgripce
  299. '' initialize SYM_PARENDIR and call PARENTDIRCB 
  300. '' 
  301. ''    Rev 1.114   16 May 1995 12:56:32   tveerapp
  302. '' Resourced the log file strings.
  303. '' 
  304. ''    Rev 1.113   16 May 1995 12:39:00   tveerapp
  305. '' Added  End of log file .
  306. '' 
  307. ''    Rev 1.112   15 May 1995 17:34:26   tveerapp
  308. '' Fixed gSERVER. For an automated server install do not process the individual
  309. '' product directories.
  310. '' 
  311. ''    Rev 1.111   15 May 1995 11:18:12   jdonohue
  312. '' Moved SetUpApi call to toolkit
  313. '' 
  314. ''    Rev 1.110   11 May 1995 17:26:52   tveerapp
  315. '' Commented out the gLOgFile$ setting in InitInstall.
  316. '' 
  317. ''    Rev 1.109   11 May 1995 14:51:50   tveerapp
  318. '' Added Status logging. Modified InitInstall.
  319. '' 
  320. ''    Rev 1.108   03 May 1995 18:12:24   mzgripce
  321. '' change cursor% to cursor& in one instance 
  322. '' 
  323. ''    Rev 1.107   03 May 1995 12:00:38   tveerapp
  324. '' Fixed cfbuild-c2build merge.
  325. '' 
  326. ''    Rev 1.106   02 May 1995 12:52:54   cmoy
  327. '' Merged c2 into cf build
  328. '' 
  329. ''    Rev 1.104   28 Apr 1995 15:57:44   mheerman
  330. '' Commented out the select program manager group dialog.
  331. ''    Rev 1.103   26 Apr 1995 09:54:24   tveerapp
  332. '' Added Customization during automation for a server install.
  333. '' 
  334. ''    Rev 1.102   25 Apr 1995 11:52:52   tveerapp
  335. '' Added Automation Customization to case gSTANDARD.
  336. '' 
  337. ''    Rev 1.103   10 Apr 1995 17:52:18   amontalv
  338. '' Changed code that removed null termination and trimmed spaces.  There
  339. '' is no longer any null termination to Script text gotten from C calls
  340. ''    Rev 1.101   06 Apr 1995 14:51:26   cmoy
  341. '' No change.
  342. '' 
  343. ''    Rev 1.102   07 Apr 1995 15:04:24   mzgripce
  344. '' 
  345. ''    Rev 1.100   05 Apr 1995 19:53:30   amontalv
  346. '' Porting to 32 bit.
  347. '' 
  348. ''    Rev 1.99   16 Mar 1995 09:58:14   mhishinu
  349. '' No change.
  350. '' 
  351. ''    Rev 1.98   22 Feb 1995 02:29:06   cmoy
  352. '' No change.
  353. '' 
  354. ''    Rev 1.97   02 Feb 1995 14:29:34   cmoy
  355. '' 
  356. '' Thangaraj fixed Pipeline Problem
  357. '' 
  358. ''    Rev 1.96   01 Feb 1995 17:51:18   tveerapp
  359. '' 
  360. '' Added the call to process Node Options for suite in NODENODEOPTIONS (for suite).
  361. '' 
  362. ''    Rev 1.95   19 Jan 1995 12:30:20   tveerapp
  363. '' 
  364. '' Fixed the lotusapp/node install problem when the product does not support
  365. '' lotusapp processing.
  366. '' 
  367. ''    Rev 1.94   09 Jan 1995 10:12:00   tveerapp
  368. '' 
  369. '' Fixed STFQUIT problem.Added UIPopAll before ending execution.
  370. '' 
  371. ''    Rev 1.93   29 Dec 1994 11:58:32   tveerapp
  372. '' 
  373. '' Commented out the call to reboot during automation.
  374. '' 
  375. ''    Rev 1.92   29 Dec 1994 11:11:06   tveerapp
  376. '' 
  377. '' Added the bitmap and new dialog for automation.
  378. '' 
  379. ''    Rev 1.91   23 Dec 1994 14:14:50   jplump
  380. '' 
  381. '' Added call to Lot_AutoGetSetLicenserInfo
  382. '' Removed print statement
  383. '' 
  384. ''    Rev 1.90   22 Dec 1994 15:07:00   tveerapp
  385. '' 
  386. '' Clean up print statements
  387. '' 
  388. ''    Rev 1.89   21 Dec 1994 17:10:22   tveerapp
  389. '' 
  390. '' Added node options processing for an automated node install in case gNODE.
  391. '' 
  392. ''    Rev 1.88   21 Dec 1994 15:01:28   tveerapp
  393. '' 
  394. '' Fixed the return value type on line 1423
  395. '' 
  396. ''    Rev 1.87   21 Dec 1994 13:55:36   tveerapp
  397. '' 
  398. '' Added Suite App selection processing to STANDARD,SERVER and NODE.
  399. '' 
  400. ''    Rev 1.86   21 Dec 1994 12:15:54   tveerapp
  401. '' 
  402. '' Modified SetTheBaseSymbol to add the check for a suite install.
  403. '' 
  404. ''    Rev 1.85   21 Dec 1994 12:03:50   tveerapp
  405. '' 
  406. '' Added automation code to SetTheBaseSymbol.Uses response file base during automation.
  407. '' 
  408. ''    Rev 1.84   12 Dec 1994 13:22:36   tveerapp
  409. '' 
  410. '' Added ResetWinWinsys call to case gSERVER$ for a server install
  411. '' to determine the win winsysdir symbols correctly.
  412. '' 
  413. ''    Rev 1.83   12 Dec 1994 13:20:00   tveerapp
  414. '' Added %s to lsirun cmd line modification.This is to account for
  415. '' the new automation command line arguments.
  416. '' 
  417. ''    Rev 1.82   12 Dec 1994 11:49:10   mzgripce
  418. '' 
  419. '' Use the SQL and Paradox Auto symbols
  420. '' 
  421. ''    Rev 1.81   08 Dec 1994 20:14:24   jplump
  422. '' 
  423. '' Added call to Lot_AutoWriteOutDebugFile
  424. '' 
  425. ''    Rev 1.80   06 Dec 1994 17:17:28   tveerapp
  426. '' Added automation processing to case gDISTRIBUTION$.
  427. '' Added response file processing from the command line (shell).
  428. '' 
  429. ''    Rev 1.79   06 Dec 1994 12:16:18   tveerapp
  430. '' Added Automation code to cases gSERVER$ and gNODE$.
  431. '' 
  432. ''    Rev 1.78   06 Dec 1994 10:21:38   tveerapp
  433. '' Added Lot_AutoConfigure and AutoInstallReboot calls.
  434. '' 
  435. ''    Rev 1.77   05 Dec 1994 16:51:44   tveerapp
  436. '' Added call to Lot_AutoGetUserInfo.
  437. '' 
  438. ''    Rev 1.76   02 Dec 1994 16:52:50   cmoy
  439. '' merged automation files
  440. '' 
  441. ''    Rev 1.75   18 Nov 1994 16:13:02   amontalv
  442. '' Japan DBCS: Added some resources to
  443. '' 
  444. ''    Rev 1.8   01 Dec 1994 17:23:14   tveerapp
  445. '' Added AutoCheckForSpace function.
  446. '' 
  447. ''    Rev 1.7   29 Nov 1994 12:49:12   tveerapp
  448. '' 
  449. '' Changed the return value of Lot_AutoGetSizeOfInstall to be an integer.
  450. '' 
  451. ''    Rev 1.6   29 Nov 1994 11:43:52   jplump
  452. '' 
  453. '' Added automation$, changed return type for Lot_AutoGetProgramGroup
  454. '' 
  455. ''    Rev 1.4   28 Nov 1994 15:52:46   tveerapp
  456. '' Added Lot_AutoGetSizeofInstall and other automation code for the standalone
  457. '' install.D
  458. '' 
  459. ''    Rev 1.3   23 Nov 1994 17:03:32   tveerapp
  460. '' 
  461. '' Added automation logic to the Init Symbol processor.
  462. '' 
  463. ''    Rev 1.2   23 Nov 1994 16:22:56   tveerapp
  464. '' 
  465. '' Added Lot_AutoGetInstallType to InitInstall. Added code to bring up
  466. '' a modeless dialog during automation.
  467. '' 
  468. ''    Rev 1.1   23 Nov 1994 14:50:40   tveerapp
  469. '' Added Automation code to InitInstall and called the auto init function.
  470. '' Also identified some of the changes to be made.
  471. ''==========
  472. '' 
  473. ''    Rev 1.74   02 Aug 1994 16:34:40   mzgripce
  474. '' No change.
  475. '' 
  476. ''    Rev 1.73   01 Aug 1994 10:27:00   cmoy
  477. '' No change.
  478. '' 
  479. ''    Rev 1.72   29 Jun 1994 10:54:18   thangv
  480. '' Moved the SYM_NETLOTUSAPP setting to inside the if statement (798,807).
  481. '' This was previously outside. The code is in NETLOTUSAPP processing. This
  482. '' should fix spr#31726.
  483. '' 
  484. ''    Rev 1.71   24 Jun 1994 11:10:38   thangv
  485. '' Moved the call to Initialize the product copylists during a node install
  486. '' to after the NODESSSAPPSEL dialog (smart suite dialog). The new lines are
  487. '' 729-733. This should fix the suite bug for node install when the user
  488. '' deselects apps but still gets them installed. The call was in the right pla
  489. '' for the std and server.
  490. '' 
  491. ''    Rev 1.70   03 Jun 1994 12:18:32   cmoy
  492. '' 
  493. '' substituted CreateProgmanGroup for ProgmanManageGroup
  494. '' 
  495. ''    Rev 1.69   02 Jun 1994 12:30:48   thangv
  496. '' Added code to process sys.admin.mapping for node install.
  497. '' 
  498. ''    Rev 1.68   31 May 1994 13:55:38   thangv
  499. '' Added restore cursor before CheckForSpace(in case node)and Showwait
  500. '' cursor after Checkfor space.
  501. '' 
  502. ''    Rev 1.67   31 May 1994 13:40:44   mmeth
  503. '' Added Function Calls for Suite to handle previous versions
  504. '' 
  505. ''    Rev 1.66   26 May 1994 18:40:06   cmoy
  506. '' 
  507. '' Replaced CreateProgmanGroup and ShowProgmanGroup with ProgmanManageGroup
  508. '' so that accented characters may be used.
  509. '' 
  510. ''    Rev 1.65   26 May 1994 17:35:12   thangv
  511. '' 
  512. '' Fixed the back link from SRVUI to SRVNODEOPTIONS (it was SRVDATALENS before
  513. '' 
  514. ''    Rev 1.64   25 May 1994 16:12:38   thangv
  515. '' Moved CheckForSpace after share is processed for node. This fixes
  516. '' the node install running out of space bug.
  517. '' 
  518. ''    Rev 1.63   17 May 1994 10:59:20   thangv
  519. '' Moved stdlotusappprompt to before stdcustomize.
  520. '' 
  521. ''    Rev 1.62   13 May 1994 12:13:32   thangv
  522. '' Changed the 2nd arg to ShowProgmanGroup to 1.(it is not minimized).
  523. '' 
  524. ''    Rev 1.61   11 May 1994 12:35:06   thangv
  525. '' Moved Showwaitcursor for the node further up before copying files.
  526. '' 
  527. ''    Rev 1.60   11 May 1994 11:11:06   thangv
  528. '' Bring up DB_PLESEWAIT twice (for std, server) and bring it up for node.
  529. '' Re-arranged Lot_CallPostCopyConifg(std,server,node).
  530. '' Added plese wait foe node install.
  531. '' 
  532. ''    Rev 1.59   11 May 1994 10:31:40   mzgripce
  533. '' sprs 29300 and 29280 (DoDatalens) 
  534. '' 
  535. ''    Rev 1.58   06 May 1994 14:15:20   mzgripce
  536. '' send the prognam name to the addicons
  537. '' 
  538. ''    Rev 1.57   05 May 1994 15:51:02   thangv
  539. '' 
  540. '' Fixed the prev. link from the SSAPPSEL.
  541. '' 
  542. ''    Rev 1.56   03 May 1994 11:09:06   mmeth
  543. '' Added back Confirm Dialog
  544. '' 
  545. ''    Rev 1.55   02 May 1994 18:56:30   mzgripce
  546. '' 
  547. '' put the addIconsXXX as its own call
  548. '' 
  549. ''    Rev 1.54   02 May 1994 14:52:42   cmoy
  550. '' 
  551. '' modified SUB AUTOEXECCONFIG to deal with different versions of windows.
  552. '' 
  553. ''    Rev 1.52   02 May 1994 13:58:22   thangv
  554. '' Added ResetCopyList calls.
  555. '' 
  556. ''    Rev 1.51   28 Apr 1994 18:33:42   cmoy
  557. '' Changed Lot_CallProductFunctions(billboards) to Lot_CallOneProductFunction
  558. '' (billboards)
  559. '' modified NumberOfBytesinBillboard to only check first product.
  560. '' 
  561. ''    Rev 1.50   26 Apr 1994 11:16:38   mzgripce
  562. '' 
  563. '' enable previous from consolidation in node
  564. '' 
  565. ''    Rev 1.49   25 Apr 1994 17:32:36   cmoy
  566. '' 
  567. '' Moved LAUNCHNAG so that it comes up after DB_DISKCOPYMETHOD dialog.
  568. '' 
  569. ''    Rev 1.48   25 Apr 1994 15:42:16   cmoy
  570. '' reset the base distribution directory to lotusdis\
  571. '' in SUB SetTheBaseSymbol
  572. '' main calls SetTheBaseSymbol after the DB_DISKCOPYMETHOD dialog
  573. '' instead of before it now.
  574. '' 
  575. ''    Rev 1.47   22 Apr 1994 14:34:14   mzgripce
  576. '' 
  577. '' set direction to back if consolidation returns back
  578. '' 
  579. ''    Rev 1.46   20 Apr 1994 16:22:06   mzgripce
  580. '' initialize SYM_DOSMAXPATHDIFF$
  581. '' 
  582. ''    Rev 1.45   20 Apr 1994 12:44:26   thangv
  583. '' Added the check AND app_flag<> FALSE to SRVNODEOPTIONS.
  584. '' When everything is unselected.
  585. '' 
  586. ''    Rev 1.44   19 Apr 1994 17:02:24   thangv
  587. '' Added code to fix the bug if all the products are
  588. '' deselected in ss dialogs in the case of standalone and
  589. '' server install.
  590. '' 
  591. ''    Rev 1.43   15 Apr 1994 11:58:26   mmeth
  592. '' NODENODEOPTIONSCB was not being registered for Personal directory dialog
  593. '' 
  594. ''    Rev 1.42   13 Apr 1994 17:06:02   mzgripce
  595. '' do not set sym_netlotusapp$ in main
  596. '' 
  597. ''    Rev 1.41   13 Apr 1994 09:31:12   cmoy
  598. '' 
  599. '' Added SUB ConfigureAUTOEXEC and implemented it
  600. '' 
  601. ''    Rev 1.40   11 Apr 1994 17:49:00   thangv
  602. '' Removed Reg_GetProdSupportforDist(1) <> TRUE check from SERVER_DISTRIBUTION
  603. '' Dialog case. (check only for Srv support.)
  604. '' which is correct.
  605. '' 
  606. ''    Rev 1.39   11 Apr 1994 12:32:16   mmeth
  607. '' 
  608. '' Cleaned up and made it more readable
  609. '' 
  610. ''    Rev 1.38   08 Apr 1994 13:53:04   thangv
  611. '' Fixed the problem with prev. button for Distribution install.
  612. '' Also added the lines in case gDISTRIBUTION that was nuked.
  613. '' 
  614. ''    Rev 1.37   07 Apr 1994 16:40:12   mmeth
  615. '' 
  616. '' Cleaned up main.lss
  617. '' 
  618. ''    Rev 1.36   06 Apr 1994 16:30:12   mmeth
  619. '' Added a list gEXTRA.  This list gets initialized with an etra 200000
  620. '' bytes for the Windows drive.  This can be modified by the product groups if
  621. '' necessary. 
  622. '' 
  623. ''*********************************************************************/
  624. OPTION DECLARE
  625.  
  626. USE "CALLBACK"
  627. USE "LANGUAGE"
  628.  
  629. DECLARE FUNCTION DoDatalens(BYVAL direction$) AS STRING
  630. DECLARE FUNCTION NumberOfBytesPerBillbd() AS LONG
  631.  
  632. DECLARE SUB      SetTheBaseSymbol()
  633. DECLARE SUB      InitInstall()
  634. DECLARE SUB      ConfigureAUTOEXEC()
  635.  
  636. '*************************************************************************
  637. '** SUB INITIALIZE
  638. '**
  639. '** Purpose: Initial entry point into Common Install
  640. '**            
  641. '** Author:    
  642. '** Arguments: None
  643. '** Returns:   NONE
  644. '*************************************************************************
  645.  
  646. SUB INITIALIZE
  647.    DIM network$, notused%, notused1$, nProducts%,prodIndex%, nDirs%, app_flag%, rc$,i%, cwd$
  648.    DIM inifile$, inf$, curcursor&, grouptitle$, dirSym$, lSize&, destdir$
  649.    DIM direction$, nbytes&, lic$, SameFlag$, netLotusapp$, installini$
  650.    DIM newnetpath$, automation$,longnotused&
  651.    DIM win95proggroup$,yesno&
  652.    DIM lang$, s$, listlen%
  653.  
  654.    '** Set up the error handlers
  655.    ON Error STFQUIT    GOTO MAINERROR
  656.    ON Error STFERR     GOTO STFERR_
  657.    ON Error STFTOGGLE  GOTO STFTOGGLEERR
  658.  
  659.    InitInstall
  660.  
  661. '   IF NOT IsNewShell() THEN
  662. '        IF Lot_CheckPriviledges(PRIVILEDGE_CHECKFLAG_REGSYSTEMPATH) <> ERROR_SUCCESS THEN
  663. '           ErrorMsg SID_ERR_SECURITY, "" 
  664. '           ERROR STFQUIT
  665. '        END IF
  666. '    END IF
  667.  
  668.    nProducts% = Reg_GetNumberOfProducts()
  669.  
  670.  
  671.    '****************************************
  672.    '******* START THE REAL WORK HERE *******
  673.    '****************************************
  674.  
  675. '***********AUTOMATION code*************************************************
  676.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  677.       SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
  678.       notused1$ = PopupModelessDlg(DB_AUTOINSTWAIT, DB_AUTOINSTWAIT)
  679.    END IF
  680.    '** Allow the only the 1st product to change the registration default
  681.    '** product will set symbols SYM_NAME$, SYM_COMPANY$
  682.       notused1$  = Lot_CallOneProductFunction (1, "DefaultUserReg", gNEXT, TRUE, "")
  683.       notused%   = Lot_ReadSerialNumber()
  684.  
  685.  
  686. WELCOME:             '** WELCOME THE USER
  687.    direction$ = gNEXT
  688.    '** Call each product's "ProductReg function". Products register themselves with toolkit.
  689.    notused1$  = Lot_CallProductFunctions ("ProductReg", gNEXT, TRUE, gALLPRODUCTS$, "")
  690.  
  691.    '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  692.    '**           and set SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$.
  693.    IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  694.      IF GetSymbolValue(SYM_NETWORK$) = gNODE$ THEN
  695.    notused% = RegisterCallback("CALLBACK", "WELCOMECB")
  696.          rc$ = PopupModalDlg(DB_WELCOME_NODE, DB_WELCOME_NODE)
  697.      ELSE
  698.         notused% = RegisterCallback("CALLBACK", "WELCOMECB")
  699.         IF Reg_GetProdSupportForSrv(1)  OR _
  700.      Reg_GetProdSupportForDist(1) <> FALSE THEN
  701.      rc$ = PopupModalDlg(DB_WELCOME, DB_WELCOME)
  702.         ELSE
  703.      rc$ = PopupModalDlg(DB_WELCOMENOSRV, DB_WELCOMENOSRV)
  704.         END IF
  705.       END IF
  706.       '** if the welcome dialog returns gBACK end Install.
  707.       IF rc$ = gBACK$ THEN END
  708.       direction$ = Lot_ConfirmNamesDlg ()
  709.       IF direction$ = gBACK$ THEN  GOTO WELCOME
  710.    ELSE
  711.    notused% = Lot_AutoGetUserInfo()
  712.    END IF
  713.  
  714.  
  715. SERVER_DISTRIBUTION: '** ASK IF THIS IS A SERVER OR DIST. INSTALL
  716.    network$ = GetSymbolValue(SYM_NETWORK$)
  717.    IF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
  718.       IF Reg_GetProdSupportforSrv(1) <> FALSE THEN
  719.  
  720.     notused%   = RegisterCallback("CALLBACK","DISKCOPYMETHODCB")
  721.     '** AUTOMATE: comment out next line and explicitly set SYM_NETWORK
  722.     '**           SetSymbolValue SYM_NETWORK, gSERVER
  723.     '**    or
  724.     '**           SetSymbolValue SYM_NETWORK, gDISTRIBUTION
  725.     direction$ = PopupModalDlg (DB_DISKCOPYMETHOD, DB_DISKCOPYMETHOD )
  726.       END IF
  727.    END IF
  728.    IF direction$ = gBACK$ GOTO WELCOME
  729.  
  730. '***********AUTOMATION code*************************************************
  731.    SetTheBaseSymbol
  732.  
  733. LAUNCHNAG:
  734.    network$ = GetSymbolValue(SYM_NETWORK$)
  735.    IF network$ = gSERVER$ THEN
  736.       notused% = RegisterCallback("CALLBACK","LAUNCHNAGCB")
  737.       '** AUTOMATE: comment out next line and never get asked about launching NAG
  738.       direction$ = PopupModalDlg (DB_LAUNCHNAG, DB_LAUNCHNAG )
  739.    END IF
  740.    IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
  741.    
  742. '** Find out if we're a language install -- handle UI differently if so    
  743.       notused1$ = Lot_CallProductFunctions("InitLanguage", gNEXT, TRUE, gALLPRODUCTS$, "")
  744.       
  745. '***********AUTOMATION code*************************************************
  746. SMARTSUITE_BASEDIR: '** If this is SmartSuite: Ask the user for the BASEDIR
  747.    network$ = GetSymbolValue(SYM_NETWORK$)
  748.    'Don't allow user to change parent directory for a language install
  749.    IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  750.    IF network$ <> gDISTRIBUTION$ AND GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  751.       notused% = RegisterCallback("SUIT", "SUITEDIRCB")
  752.       '** AUTOMATE: comment out next line and explicitly set SYM_BASEDIR$
  753.       '**   SetSymbolValue SYM_BASEDIR$, "C:\lotsuite"     
  754. '      direction$ = PopupModalDlg(DB_SUITEDIR, DB_SUITEDIR)
  755.    ELSEIF network$ <> gDISTRIBUTION$ THEN
  756. '      notused% = RegisterCallback("CALLBACK", "PARENTDIRCB")
  757. '      direction$ = PopupModalDlg(DB_PARENTDIR, DB_PARENTDIR)
  758.    END IF
  759.    END IF
  760.    IF direction$ = gBACK$ THEN GOTO LAUNCHNAG
  761.    '**************************
  762.    '** Some more intialization
  763.    '**************************
  764.  
  765.    '** Default all products to complete install
  766.     network$ = GetSymbolValue(SYM_NETWORK$)
  767.     IF network$ = gSERVER THEN 
  768.        SetSymbolValue SYM_SIZEOFINSTALL$, gCOMPLETE$
  769.        FOR i% = 1 to nProducts%
  770.           Reg_SetSelectedInstallType i%, gCOMPLETE$
  771.        NEXT
  772.     ELSE
  773.        SetSymbolValue SYM_SIZEOFINSTALL$, gLAPTOP$
  774.        FOR i% = 1 to nProducts%
  775.           Reg_SetSelectedInstallType i%, gLAPTOP$
  776.        NEXT
  777.     END IF
  778.  
  779.    automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
  780.    network$ = GetSymbolValue(SYM_NETWORK$)
  781.    cwd$     = GetSymbolValue(SYM_STF_CWDDIR$)
  782.    inifile$ = MakePath(cwd$,gINSTALLINI$)
  783.  
  784.    SELECT CASE network$
  785.  
  786.    '**********************************************************************
  787.    '*********************** Standard Install *****************************
  788.    '**********************************************************************
  789.  
  790.    CASE gSTANDARD$
  791.  
  792.       '** Read the INF file and initialize the share engine
  793.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "STDINFFILE")
  794.       ReadInfFile inf$
  795.       notused% = Lot_CallSharedTool("InitSHARE()")
  796.  
  797.       '** Allow the products to do their initialization
  798.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  799.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  800.  
  801.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  802.       direction$  = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
  803.     IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  804.       END IF
  805.  
  806.  
  807. '***********AUTOMATION code*************************************************
  808. STDSSAPPSEL:
  809.       '** In this dialog, the user can select/deselect applications to be
  810.       '** installed, and also specify directories for individual apps
  811.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  812.          IF automation$ <> gTRUE$ THEN
  813.          notused% = RegisterCallback("SUIT", "APPSELCB")
  814.          '** AUTOMATE: comment out to take defaults, too tricky
  815.          '** to automatically pick anything different.
  816.          direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
  817.          ELSE
  818.          notused% = Lot_AutoSuiteAppSelect()
  819.          END IF   
  820.       END IF
  821.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  822.    
  823.       '***********AUTOMATION code: Set The destination Dir symbols*********
  824.       IF automation$ = gTRUE$ AND _
  825.      GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  826.       notused% = Lot_AutoGetProductDestDirSymbol ()
  827.       END IF
  828.  
  829.       '** Consolidate the lotusapp if needed
  830.       IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
  831.     direction$ = gBACK$
  832.       END IF
  833.       IF direction$ = gBACK$  GOTO STDSSAPPSEL
  834.  
  835. '***********AUTOMATION code*************************************************
  836. STDSIZEOFINSTALL:   '** Ask the user kind of install: (COMPLETE, CUSTOM, LAPTOP)   
  837.      '** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
  838.      '**   Result will be a default install of "COMPLETE", anything else is too tricky.
  839.      '**   For a non-suite install you can set the destination directory:
  840.      '**       dirSym$ = Reg_GetDirSymbolList(1)
  841.      '**       dirSym$ = GetListItem(dirSym$, 1)
  842.      '**       SetSymbolValue dirSym$, "c:\foo\"
  843.      '**       Lot_RefreshDestination(dirSym$)
  844.       nProducts% = Reg_GetNumberOfProducts() :  app_flag% = FALSE
  845.       FOR prodIndex% = 1 to nProducts%
  846.      If Reg_GetUIInOrOut (prodIndex%) <> FALSE  AND _
  847.         Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
  848.         app_flag% = TRUE
  849.      End If
  850.       NEXT
  851.       If app_flag% <> FALSE  Then
  852.    If automation$ = gTRUE$ Then
  853.      notused% = Lot_AutoGetSizeOfInstall()
  854.    Else
  855.      direction$ = Lot_GetSizeOfInstall()
  856.      IF direction$ = gBACK$ GOTO STDSSAPPSEL
  857.    End If
  858.       End If
  859.  
  860.       ResetCopyList    '** Reset the copylist
  861.  
  862. STDINITIALIZECOPYLST:  '** Make the products initialize their own copy list
  863.       direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
  864.       IF direction$ = gBACK$ GOTO STDSIZEOFINSTALL
  865.  
  866. '*****AUTOMATION code *****************************************************
  867.       IF automation$ = gTRUE$ AND _
  868.     GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  869.    notused% = Lot_AutoCustomizeShare()
  870.       END IF
  871.  
  872.       Lot_SetCurrentProduct(1) 
  873.  
  874. STDCUSTOM:
  875.  
  876.      IF automation$ <> gTRUE$ Then
  877.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  878.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  879.        notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
  880.        direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
  881.                DBM_CUSTOMIZEBASESINGLEPROD)
  882.     ELSE
  883.         If app_flag% <> FALSE  Then
  884.        notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
  885.        direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
  886.                   DBSUIT_CUSTOMIZEAPPS)
  887.         End If
  888.     END IF
  889.       END IF
  890.      ELSE
  891.    '*** Customize Suite before customizing individual products ***
  892.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  893.         notused% = Lot_AutoInstallSuiteCustomize()
  894.    END IF
  895.    notused% = Lot_AutoInstallCustomize()
  896.      END IF
  897.  
  898.      IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
  899.  
  900. STDDATALENS:   '** Process the Datalens modules
  901.       direction$ = DoDatalens(direction$) 
  902.       IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
  903.  
  904. STDUSERUI:  '** Allow product to bring up any last minute UI
  905.      '** AUTOMATE: comment out next line and  avoid product specific UI.
  906.       direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  907.       IF direction$ = gBACK$ GOTO STDDATALENS
  908.  
  909. '***********AUTOMATION code*************************************************
  910. IF  automation$ <> gTRUE$ THEN
  911. STDPROGMAN: '** Put Progman Group UI
  912.    notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  913.       '** AUTOMATE: comment out next line set the progman group name yourself
  914.       '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  915.    IF Reg_GetRootFolder() = "" THEN
  916.       direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  917.    ELSE  
  918.       direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  919.    END IF
  920.    IF direction$ = gBACK$ GOTO STDUSERUI
  921. ELSE
  922.    notused% = Lot_AutoGetProgramGroupOrFolder()
  923. END IF
  924.       
  925.      UIPOP 1     '** Bring down automation PLEASEWAIT
  926.       
  927.       '** Start the file copy
  928.  
  929.       notused% = Lot_AutoWriteOutDebugFile()
  930.  
  931.       direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
  932.       IF direction$ = gBACK$ GOTO STDPROGMAN
  933.  
  934.       '*****AUTOMATIONCODE********************************
  935.       '*** Precopy Config processor
  936.  
  937.       '** Give the products a last crack at the CopyList before it gets copied
  938.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  939.  
  940.       '** Make sure there is enough space
  941.       IF automation$ = gTRUE$ THEN
  942.    notused% = AutoCheckForSpace()
  943.       ELSE      
  944.    SELECT CASE GetSymbolValue(SYM_SIZEOFINSTALL$)
  945.  
  946.     CASE gCOMPLETE$
  947.        IF CheckForSpace(DB_INSUFDISKSPACE)     = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
  948.     CASE gLAPTOP$
  949.        IF CheckForSpace(DB_INSUFDISKSPACEMIN)  = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
  950.     CASE gCUSTOM$
  951.        IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SMARTSUITE_BASEDIR 'STDCUSTOM
  952.     END SELECT
  953.       END IF
  954.       '** Copy all the files in the copylist
  955.    longnotused& = SetSizeCheckMode(CLNG(0))
  956.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN 
  957.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  958.       END IF
  959.       nbytes& = NumberOfBytesPerBillbd()
  960.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  961.       
  962.       ''Display bmps centred in billboards
  963.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
  964.       CopyFilesInCopyList
  965.       ''Set it back to default now
  966.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  967.  
  968.       '** Configure the shared files
  969.       curcursor& = ShowWaitCursor()
  970.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  971.       notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  972.       notused% = Lot_SaveFeaturesInstaledInInstallIni()
  973.       
  974.       '** Allow the products to configure the product after file copy
  975.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  976.       
  977.       UIPOP 1     '** Bring down DB_PLEASEWAIT
  978.  
  979.      IF NOT IsNewShell() THEN
  980.          '** Create a program manager group for the product #1
  981.         grouptitle$ = Reg_GetProgManagerGroupName(1)
  982. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  983.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  984.      END IF
  985.  
  986.       notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  987.  
  988.       '** Bring up DB_PLEASEWAIT again
  989.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  990.       notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  991.       
  992.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  993.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  994.  
  995.       UIPOP 1     '** Bring down DB_PLEASEWAIT
  996.       RestoreCursor curcursor&
  997.      
  998.       '** Win32: This should do nothing except bring up the success dlg. 
  999.       ConfigureAUTOEXEC
  1000.  
  1001.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1002.       'IF automation$ = gTRUE$ THEN
  1003.       '  AutoInstallReboot
  1004.       'END IF  
  1005.    '**********************************************************************
  1006.    '************************* Server Install *****************************
  1007.    '**********************************************************************
  1008.  
  1009.    CASE gSERVER$
  1010.  
  1011.       '** Read the Server INF and initialize SHARE
  1012.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "SRVINFFILE")
  1013.       ReadInfFile inf$
  1014.       notused% = Lot_CallSharedTool("InitSHARE()")
  1015.  
  1016. '***********AUTOMATION code*************************************************
  1017. SMARTSUITE_LOTUSAPPDIR:
  1018.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$  AND _
  1019.              Reg_GetProdSupportforShare(1) = 1 THEN
  1020.  
  1021.             'Set defaults for components and lotusapp directories based on
  1022.             'cinstall.ini found in parent directory
  1023.             s$ = GetSymbolValue(SYM_BASEDIR$)
  1024.             installini$ =  MakePath( s$, gINSTALLINI$)
  1025.             IF DoesFileExist(installini$,femExists) = 1 THEN
  1026.             '** Set server defaults for LOTUSAPPDIR and COMPONENTSDIR based on entries
  1027.             '** in cinstall.ini 
  1028.                 s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1029.                         "LOTUSAPPDIR")
  1030.                 IF s$ <> "" THEN 
  1031.                     SetSymbolValue SYM_LOTUSAPPDIR$, s$
  1032.                     SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
  1033.                 END IF
  1034.                 s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1035.                         "COMPONENTSDIR")
  1036.                 IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
  1037.                 lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
  1038.                 s$ = GetIniKeyString(  installini$, "TOOLKIT", "Language")
  1039.             '** Check for language install
  1040.                 IF s$ <> "" AND s$ <> lang$ THEN 
  1041.                     SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
  1042.                     'For suite/server, all products are language or not
  1043.                     listlen% = GetListLength(SYM_INSTALLKINDS$)
  1044.                     FOR i% = 1 TO listlen%
  1045.                         SetListItem SYM_INSTALLKINDS$, i%, gLANGUAGEINSTALL$
  1046.                     NEXT
  1047.             '** Inform the user what's happening
  1048.             '** The product name is based on first product (single product name or Suite)
  1049.                     s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
  1050.                     PopupLanguageInstallMessage( s$ )
  1051.                 END IF
  1052.  
  1053.             END IF
  1054.             IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN  
  1055.                 notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
  1056.          '** AUTOMATE: comment out next line and explicitly set SYM_LOTUSSAPPDIR$
  1057.          '**   SetSymbolValue SYM_LOTUSAPPDIR$, "C:\lotusapp" 
  1058.          '**   Lot_RefreshDestination SYM_LOTUSAPPDIR$
  1059.                 direction$ = PopupModalDlg (DBM_SPECIFY_SRVLOTUSAPPDIR, DBM_SPECIFY_SRVLOTUSAPPDIR)
  1060.             END IF
  1061.       
  1062.         END IF
  1063.         
  1064.       IF direction$ = gBACK$ THEN  GOTO SMARTSUITE_BASEDIR
  1065.  
  1066.       '** Allow the products to do their initialization
  1067.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1068.       IF direction$ = gBACK$ GOTO WELCOME
  1069.  
  1070.       '** TV: These were called in the callbacks. They should be called in main
  1071.       '** instead.
  1072.       ResetWinWinsysSymbols
  1073.  
  1074. SRVSSAPPSEL: '** In this dialog, the user can select/deselect applications to
  1075.         '** be installed, and also specify directories for individual apps
  1076.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1077.          IF automation$ <> gTRUE$ THEN
  1078.          notused% = RegisterCallback("SUIT", "APPSELCB")
  1079.          '** AUTOMATE: comment out to take defaults, too trickey
  1080.          '** to automatically pick anything different.
  1081.          direction$ = PopupModalDlg (DBSUIT_SAPPSEL, DBSUIT_SAPPSEL)
  1082.          ELSE
  1083.          notused% = Lot_AutoSuiteAppSelect()
  1084.          END IF   
  1085.       END IF
  1086.       IF direction$ = gBACK$ GOTO SMARTSUITE_LOTUSAPPDIR
  1087.  
  1088. SRVSIZEOFINSTALL:  '** Ask kind of install to do (COMPLETE, CUSTOM, LAPTOP)   
  1089.  
  1090.      '** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
  1091.      '**   Result will be a default install of "COMPLETE", anything else is too tricky.
  1092.      '**   For a non-suite install you can set the destination directory:
  1093.      '**       dirSym$ = Reg_GetDirSymbolList(1)
  1094.      '**       dirSym$ = GetListItem(dirSym$, 1)
  1095.      '**       SetSymbolValue dirSym$, "c:\foo\"
  1096.      '**       Lot_RefreshDestination(dirSym$)
  1097.       nProducts% = Reg_GetNumberOfProducts() :  app_flag% = FALSE
  1098.       FOR prodIndex% = 1 to nProducts%
  1099.      If Reg_GetUIInOrOut (prodIndex%) <> FALSE  AND _
  1100.         Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
  1101.         app_flag% = TRUE
  1102.      End If
  1103.       NEXT
  1104.       If app_flag% <> FALSE  Then
  1105.    If automation$ = gTRUE$ Then
  1106.      notused% = Lot_AutoGetSizeOfInstall()
  1107.    Else
  1108.      direction$ = Lot_GetSizeOfInstall ()
  1109.            IF direction$ = gBACK$ GOTO SRVSSAPPSEL
  1110.    End If
  1111.       End If
  1112.  
  1113.     '** Language Install Code
  1114.    '**
  1115.    s$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
  1116.    s$ = Lot_GetChapterValStr(s$, F_DESTDIRSYM)
  1117.    s$ = GetSymbolValue(s$)
  1118.    installini$ =  MakePath( s$, gINSTALLINI$)
  1119.    lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
  1120.    IF DoesFileExist(installini$,femExists) = 1 THEN
  1121.     
  1122.     '** If cinstall.ini exists in the product dir, and the language is different
  1123.     '** and we are a server install, then we are in a language install
  1124.     '**
  1125.         s$ = GetIniKeyString(  installini$, "TOOLKIT", "Language")
  1126.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$  AND _
  1127.             s$ <> "" AND s$ <> lang$ THEN
  1128.             SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
  1129.             SetListItem SYM_INSTALLKINDS$, 1, gLANGUAGEINSTALL$
  1130.             ' We have to do this again, since we are now language install
  1131.             direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, _
  1132.                     gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1133.     '** Inform the user what's happening
  1134.     '** The product name is based on first product (single product name or Suite)
  1135.             s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
  1136.             PopupLanguageInstallMessage( s$ )
  1137.         '** Reset server values for LOTUSAPPDIR and COMPONENTSDIR based on entries
  1138.         '** in cinstall.ini 
  1139.             s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1140.                     "LOTUSAPPDIR")
  1141.             IF s$ <> "" THEN 
  1142.                 SetSymbolValue SYM_LOTUSAPPDIR$, s$
  1143.                 SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
  1144.             END IF
  1145.             s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1146.                     "COMPONENTSDIR")
  1147.             IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
  1148.  
  1149.         END IF
  1150.  
  1151.    END IF
  1152.  
  1153.       ResetCopyList    '** Reset the copylist
  1154.  
  1155.       '** Make the products initialize their own copy list
  1156.       direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
  1157.       IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
  1158.  
  1159. '*****AUTOMATION code *****************************************************
  1160.       IF automation$ = gTRUE$ AND _
  1161.     GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1162.    notused% = Lot_AutoCustomizeShare()
  1163.       END IF
  1164.      
  1165.       Lot_SetCurrentProduct(1) 
  1166.  
  1167. SRVCUSTOM:
  1168.  
  1169.      IF automation$ <> gTRUE$ Then
  1170.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1171.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1172.        notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
  1173.        direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
  1174.                DBM_CUSTOMIZEBASESINGLEPROD)
  1175.     ELSE
  1176.        If app_flag% <> FALSE  Then
  1177.          notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
  1178.          direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
  1179.                DBSUIT_CUSTOMIZEAPPS)
  1180.        End If
  1181.     END IF
  1182.       END IF
  1183.      ELSE
  1184.    '*** Customize Suite before customizing individual products ***
  1185.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1186.         notused% = Lot_AutoInstallSuiteCustomize()
  1187.    END IF
  1188.    notused% = Lot_AutoInstallCustomize()
  1189.      END IF
  1190.      
  1191.      IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
  1192.  
  1193. SRVDATALENS: '** Process the Datalens modules
  1194.       direction$ = DoDatalens(direction$) 
  1195.       if direction$ = gBACK$ GOTO SRVCUSTOM
  1196.  
  1197. SRVNODEOPTIONS: '** Process the Node Options
  1198.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ AND _
  1199.     Lot_AreAnyNodeOptAvailToSrv() <> 0 AND _
  1200.     app_flag% <> FALSE THEN
  1201.    IF automation$ <> gTRUE$ THEN
  1202.     notused% = RegisterCallback("CALLBACK", "SRVNODEOPTIONSCB")
  1203.     '** AUTOMATE: comment out call toPopupmodalDlg and get default.
  1204.     direction$ = PopupModalDlg (DB_SRV_NODEOPTIONS, _
  1205.                DB_SRV_NODEOPTIONS)
  1206.    ELSE
  1207.     notused% = Lot_AutoSetSrvNodeOptions()
  1208.    END IF
  1209.       END IF
  1210.       IF direction$ = gBACK$ GOTO SRVDATALENS
  1211.  
  1212. SRVUI:  '** Allow product to bring up any last minute UI
  1213.      '** AUTOMATE: comment out next line and  avoid product specific UI.
  1214.  
  1215.  
  1216.             direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  1217.             IF direction$ = gBACK$ GOTO SRVNODEOPTIONS
  1218.  
  1219.       IF automation$ = gTRUE$ THEN  
  1220.          notused% = Lot_AutoGetSetLicenserInfo()
  1221.       END IF  
  1222.  
  1223. '***********AUTOMATION code*************************************************
  1224. IF  automation$ <> gTRUE$ THEN
  1225. SRVPROGMAN: '** Put Progman Group UI
  1226.       notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  1227.      '** AUTOMATE: comment out next line set the progman group name yourself
  1228.      '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  1229.       IF Reg_GetRootFolder() = "" THEN
  1230.          direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  1231.       ELSE  
  1232.          direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  1233.       END IF
  1234.       IF direction$ = gBACK$ GOTO SRVUI
  1235. ELSE
  1236.       notused% = Lot_AutoGetProgramGroupOrFolder()
  1237. END IF
  1238.  
  1239.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1240.  
  1241.       notused% = Lot_AutoWriteOutDebugFile()
  1242.  
  1243.       direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
  1244.       IF direction$ = gBACK$ GOTO SRVPROGMAN
  1245.  
  1246.       '*****AUTOMATIONCODE********************************
  1247.       '*** Precopy Config processor
  1248.  
  1249.       '** Give the products a last crack at the CopyList before it gets copied
  1250.       ''* IF there is any product with licensing turned on, then
  1251.       ''* assume its on for all products.
  1252.       lic$ = CSTR(FALSE)
  1253.       FOR i% = 1 to nProducts%
  1254.     IF Reg_GetProdSupportForLicense (i%) <> FALSE   AND _
  1255.        Reg_IsLicenseSelected (i%)        <> FALSE   THEN
  1256.           lic$ = CSTR(TRUE)
  1257.           EXIT FOR
  1258.     END IF
  1259.       NEXT
  1260.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, lic$)
  1261.  
  1262.       '** Make sure there is enough space
  1263.       IF automation$ = gTRUE$ THEN
  1264.    notused% = AutoCheckForSpace()
  1265.       ELSE      
  1266.    IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
  1267.     IF CheckForSpace(DB_INSUFDISKSPACE)     = FAILURE GOTO SMARTSUITE_BASEDIR 'SRVSIZEOFINSTALL
  1268.         ELSE
  1269.     IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SMARTSUITE_BASEDIR 'SRVCUSTOM
  1270.         END IF
  1271.       END IF
  1272.  
  1273.       '** Start the file copy
  1274.       notused% = SetSizeCheckMode(FALSE)
  1275.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1276.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1277.       END IF
  1278.       nbytes& = NumberOfBytesPerBillbd()
  1279.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1280.       CopyFilesInCopyList
  1281.  
  1282.       ' Special case of server/language install
  1283.         ' Set cinstall.ini location to subdirectory for writing installed features
  1284.       IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN 
  1285.             s$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) 
  1286.             gINSTALLINI$ =  Lot_SetLanguageDirectory(s$) + "\" + gINSTALLINI$
  1287.         END IF
  1288.       '** Configure the shared files
  1289.       curcursor& = ShowWaitCursor()
  1290.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1291.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1292.       notused%   = Lot_SaveFeaturesInstaledInInstallIni()
  1293.  
  1294.       '** All the products to configure after copy
  1295.       IF Lot_AreAnyNodeOptAvailToSrv() <> 0 THEN
  1296.     notused% = Lot_SaveTheNodeOptionsInInstallIni()
  1297.       END IF
  1298.  
  1299.       '** Allow the products to configure the product after file copy
  1300.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
  1301.       
  1302.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1303.  
  1304.       '** Create a program manager group for the product #1
  1305.       grouptitle$ = Reg_GetProgManagerGroupName(1)
  1306. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  1307.       If NOT IsNewShell() THEN
  1308.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  1309.       End If
  1310.       notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1311.  
  1312.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1313.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1314.       
  1315.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  1316.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  1317.  
  1318.       '** Change the install.ini file so we can do NODE install from server
  1319.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1320.     dirSym$ = Reg_GetDirSymbolList(1)
  1321.     If GetListLength(dirSym$) <= 0 Then
  1322.        ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, "" 
  1323.        ERROR STFQUIT
  1324.     End If
  1325.     dirSym$ = GetListItem(dirSym$, 1)
  1326.       ELSE
  1327.     dirSym$ = SYM_BASEDIR$
  1328.       END IF
  1329.       ' Special case of server/language install, use INSTDIR for install.lst
  1330.       IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN _
  1331.             dirSym$ = "INSTDIR"
  1332.       CreateIniKeyValue GetSymbolValue(dirSym$) + "install.lst", _
  1333.          "Params", "CmdLine",                     _
  1334.          |lsirun.exe start /S "%s" %s /N|, cmoOverwrite
  1335.       
  1336.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1337.       RestoreCursor curcursor&
  1338.  
  1339.       '** Tell user we succeeded
  1340.       '* Only looks at first product! Won't work for smartsuite MMETH
  1341.       notused% = RegisterCallback("CALLBACK","SRV_SUCCESSCB")
  1342.       IF CINT(FIsKeywordInCopyList("LICTOP")) <> FALSE AND _
  1343.     Reg_IsLicenseSelected (1) <> FALSE THEN
  1344.     rc$ = PopupModalDlg (DB_SRV_SUCCESS_LIC, DB_SUCCESS)
  1345.       ELSE
  1346.     rc$ = PopupModalDlg (DB_SRV_SUCCESS, DB_SUCCESS)
  1347.       END IF
  1348.  
  1349.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1350.  
  1351.    '**********************************************************************
  1352.    '************************* Node Install *******************************
  1353.    '**********************************************************************
  1354.  
  1355.    CASE gNODE$
  1356.       
  1357.       '** Read in the INF file and init share
  1358.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "NODEINFFILE")
  1359.       ReadInfFile inf$
  1360.       notused% = Lot_CallSharedTool("InitSHARE()")
  1361.  
  1362.       '** Call the product initialization functions
  1363.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1364.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1365.  
  1366.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1367.             direction$  = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
  1368.     IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1369.       END IF
  1370.  
  1371.       '************** For smart suite, Application Selection Dialog *****
  1372. NODESSAPPSEL:
  1373.       '** In this dialog, the user can select/deselect applications to be
  1374.       '** installed, and also specify directories for individual apps
  1375.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1376.          IF automation$ <> gTRUE$ THEN
  1377.          notused% = RegisterCallback("SUIT", "APPSELCB")
  1378.          '** AUTOMATE: comment out to take defaults, too trickey
  1379.          '** to automatically pick anything different.
  1380.          direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
  1381.          ELSE
  1382.          notused% = Lot_AutoSuiteAppSelect()
  1383.          END IF   
  1384.       END IF
  1385.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1386.  
  1387.       '***********AUTOMATION code******************************
  1388.       IF automation$ = gTRUE$ AND _
  1389.      GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  1390.       notused% = Lot_AutoGetProductDestDirSymbol ()
  1391.       END IF
  1392.  
  1393.         '** Language Install Code
  1394.         ' install must be in a language subdirectory and the language a
  1395.         ' secondary language for the server
  1396.         IF IsServerSecondaryLanguage AND SrcDirResetFlag <> TRUE THEN 
  1397.             s$ = GetSymbolValue(SYM_STF_SRCDIR$)  
  1398.             i% = Len(s$) - 1    'Assume last character is \
  1399.             DO 
  1400.                 i% = i% - 1
  1401.             LOOP    UNTIL Mid(s$, i%, 1) = "\"
  1402.         SetSymbolValue SYM_STF_SRCDIR$, Mid(s$, 1, i%)
  1403. 'Doesnt work on Novell??
  1404. '        SetSymbolValue SYM_STF_SRCDIR$, GetSymbolValue(SYM_STF_SRCDIR$)  + "..\"  
  1405.             SrcDirResetFlag = TRUE
  1406.       END IF
  1407.       
  1408.       ResetCopyList    '** Reset the copylist
  1409.  
  1410.  
  1411.       '** Make the products initialize their own copy list
  1412.       direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
  1413.       IF direction$ = gBACK$ GOTO NODESSAPPSEL
  1414.  
  1415.       '** Consolidate the lotusapp if needed
  1416.       IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
  1417.     direction$ = gBACK$
  1418.       END IF
  1419.       IF direction$ = gBACK$  GOTO NODESSAPPSEL
  1420.  
  1421.  
  1422.       '************************ Change Node Path *************************
  1423. CHANGE_NODE_PATH:
  1424.       IF direction$ = gBACK$ GOTO NODESSAPPSEL
  1425.  
  1426. NODESIGLEPDIRNOPT:
  1427.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1428.     dirSym$ = Reg_GetDirSymbolList(1)
  1429.     '** AUTOMATE: comment out calls to "PopupmodalDlg"
  1430.     '**   Result will be a default install of with files coming down.
  1431.     '**   For a non-suite install you can set the destination directory:
  1432.     '**       dirSym$ = Reg_GetDirSymbolList(1)
  1433.     '**       dirSym$ = GetListItem(dirSym$, 1)
  1434.     '**       SetSymbolValue dirSym$, "c:\foo\"
  1435.     '**       Lot_RefreshDestination(dirSym$)
  1436.     If GetListLength(dirSym$) >= 1  Then  
  1437.        IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
  1438.           IF automation$ <> gTRUE$ THEN   
  1439.             notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
  1440.             direction$ = PopupModalDlg (DB_NODE_PERSONALDIRNODEOPT, _
  1441.                DB_NODE_PERSONALDIRNODEOPT)
  1442.           ELSE
  1443.       notused% = Lot_AutoProcessNodeoptions()
  1444.           END IF  
  1445.        ELSE
  1446.           ' put a box for personal dir
  1447.           If GetListLength(dirSym$) >= 1   Then
  1448.          dirSym$ = GetListItem(dirSym$, 1)
  1449.         If GetSymbolValue(dirSym$)<> "" Then
  1450.           notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
  1451.           direction$ = PopupModalDlg (DB_NODE_PERSONALDIR, _
  1452.                DB_NODE_PERSONALDIR)
  1453.         End If
  1454.           End If
  1455.        END IF
  1456.     End If
  1457.        END IF
  1458.        IF direction$ = gBACK$ GOTO CHANGE_NODE_PATH
  1459.  
  1460.  
  1461. NODELOTUSAPP:  '**  This dialog asks the user for the lotusapp drive 
  1462.    IF Lot_AreShareToolsSupported()=1 THEN
  1463.       installini$ = Lot_GetInstallDir()+gINSTALLINI$
  1464.       'netLotusapp$ = GetAbsPathFromIni(installini$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$,NULLSTROK,INVALIDSTROK)
  1465.       'SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
  1466.       netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
  1467.       SameFlag$ = GetIniKeyString(installini$, _
  1468.            "Server Configuration of Shared Tools", _
  1469.            "SameDriveFlag")
  1470.  
  1471.       If  SameFlag$ = "1"  Then
  1472.     If  DoesDirExist(netLotusapp$) <> 1  Then
  1473.        newnetpath$ = TrimNetlotusapp$(netLotusapp$)
  1474.        If newnetpath$ <> "" Then  
  1475.           netLotusapp$ = newnetpath$
  1476.           SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
  1477.             Else
  1478.                yesno& = DoMsgBox(LdString(SID_ERR_DIRSYNTAX) + CHR$(10) + CHR$(10) + "     " + netLotusapp$ + _
  1479.                               CHR$(10) + CHR$(10) + LdString(SID_NODENONEXISTLOTUSAPPDIR1),LdString(SID_TKT_STD_TITLE), _
  1480.                               MB_OK + MB_ICONSTOP)
  1481.                SetListItem "__LASTSTATUS", 1, "Q"
  1482.                GOTO MAINERROR
  1483.  
  1484.        End If
  1485.     End If
  1486.       Else
  1487.    If  DoesDirExist(netLotusapp$) <> 1 AND netLotusapp$ <> "" Then
  1488.        newnetpath$ = TrimNetlotusapp$(netLotusapp$)
  1489.        If newnetpath$ <> "" Then  
  1490.           netLotusapp$ = newnetpath$
  1491.           SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
  1492.        Else
  1493.           notused% = RegisterCallback("CALLBACK","NODELOTUSAPPCB")
  1494.           '** AUTOMATE: comment out next line and explicitly set SYM_NETLOTUSAPP$
  1495.           '**   SetSymbolValue SYM_NETLOTUSAPP$, "C:\lotusapp" 
  1496.           '**   Lot_RefreshDestination SYM_LOTUSAPPDIR$
  1497.           '** NOTE: This is where we can find the lotusapp on the network.
  1498.           direction$ = PopupModalDlg (DB_NODELOTUSAPP, DB_NODELOTUSAPP)
  1499.        End If
  1500.    End If
  1501.       End If
  1502.   END IF   
  1503.       'MZ      
  1504.       'SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
  1505.  
  1506.  
  1507.       IF direction$ = gBACK$ GOTO NODESIGLEPDIRNOPT
  1508.  
  1509.  
  1510. NODENODEOPTIONS:
  1511.       '** Process the Node Options FOR SUIT
  1512.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) =  gSMARTSUITE$ THEN
  1513.     IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
  1514.       IF automation$ <> gTRUE$ THEN 
  1515.        notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
  1516.        '** AUTOMATE: comment out next line and get files copied to your machine
  1517.        direction$ = PopupModalDlg (DB_NODE_NODEOPTIONS, _
  1518.                DB_NODE_NODEOPTIONS)
  1519.       ELSE
  1520.       notused% = Lot_AutoProcessNodeoptions()
  1521.       END IF   
  1522.     END IF
  1523.       END IF
  1524.       IF direction$ = gBACK$ GOTO NODELOTUSAPP
  1525.  
  1526. NODEUI:  '** Allow the product to put up its UI
  1527.       direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  1528.       IF direction$ = gBACK$ GOTO NODENODEOPTIONS:
  1529.  
  1530. '***********AUTOMATION code*************************************************
  1531. IF  automation$ <> gTRUE$ THEN
  1532. NODEPROGMAN:  '** Put Progman Group UI
  1533.       notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  1534.      '** AUTOMATE: comment out next line set the progman group name yourself
  1535.      '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  1536.       IF Reg_GetRootFolder() = "" THEN
  1537.          direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  1538.       ELSE  
  1539.          direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  1540.       END IF
  1541.       IF direction$ = gBACK$ GOTO NODEUI
  1542. ELSE
  1543.       notused% = Lot_AutoGetProgramGroupOrFolder()
  1544. END IF
  1545.  
  1546.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1547.  
  1548.       notused% = Lot_AutoWriteOutDebugFile()
  1549.  
  1550.       direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
  1551.       IF direction$ = gBACK$ GOTO NODEPROGMAN
  1552.  
  1553.       '*****AUTOMATIONCODE********************************
  1554.       '*** Precopy Config processor
  1555.  
  1556.       '** Configuration before copying
  1557.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1558.  
  1559.  
  1560.       curcursor& = ShowWaitCursor()
  1561.       '** Copy the files
  1562.       longnotused& = SetSizeCheckMode(CLNG(FALSE))
  1563.       notused% = Lot_CallSharedTool ("Lot_RefreshLocalLotusapp()")
  1564.       notused% = Lot_RefreshLocalComponentDir 
  1565.  
  1566.       RestoreCursor curcursor&
  1567.       '** Make sure there is enough space before continuing
  1568.       IF automation$ = gTRUE$ THEN
  1569.    notused% = AutoCheckForSpace()
  1570.       ELSE      
  1571.         IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO CHANGE_NODE_PATH
  1572.       END IF
  1573.       
  1574.       curcursor& = ShowWaitCursor()
  1575.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1576.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1577.       END IF
  1578.  
  1579.       nbytes& = NumberOfBytesPerBillbd()
  1580.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1581.  
  1582.         '** Language Install Code
  1583.         ' For a server install of a secondary language, content files are in
  1584.         ' subdirectories of where the primary language source files are
  1585.         IF IsServerSecondaryLanguage THEN RefreshLanguageSourceDirectories
  1586.  
  1587.       CopyFilesInCopyList
  1588.  
  1589.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1590.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1591.       notused% = Lot_SaveFeaturesInstaledInInstNodeIni()
  1592.  
  1593.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
  1594.       
  1595.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1596.       
  1597.       '** Allow the products to do their initialization
  1598.       grouptitle$ = Reg_GetProgManagerGroupName(1)
  1599. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  1600.       If NOT IsNewShell() THEN
  1601.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  1602.       End If
  1603.       notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1604.  
  1605.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1606.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1607.       
  1608.       '** Configure the shared files
  1609.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  1610.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  1611.  
  1612.       '** DONE
  1613.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1614.       RestoreCursor curcursor&
  1615.       
  1616.       '** Win32: This should do nothing except bring up the success dlg. 
  1617.       ConfigureAUTOEXEC
  1618.  
  1619.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1620.       'IF automation$ = gTRUE$ THEN
  1621.       '  AutoInstallReboot
  1622.       'END IF  
  1623.  
  1624.  
  1625.    '**********************************************************************
  1626.    '******************** Distribution Install ****************************
  1627.    '**********************************************************************
  1628.  
  1629.    CASE gDISTRIBUTION$
  1630.  
  1631.       '** Initialize
  1632.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "BYWIREINFFILE")
  1633.       ReadInfFile inf$
  1634.  
  1635.       '** Product initialiation
  1636.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1637.       IF direction$ = gBACK$ GOTO WELCOME
  1638.  
  1639. '***********AUTOMATION code*************************************************
  1640. IF automation$ = gTRUE$ THEN
  1641.       notused% = Lot_AutoGetProductDestDirSymbol ()
  1642. ELSE
  1643.  
  1644.       '******************* Change Distribution Install *******************
  1645.  
  1646. ChangeDistPath:
  1647.  
  1648.       lSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  1649.       SetListItem "IDC_TEXT", 1, STR$(lSize&) + gStrK$
  1650.  
  1651.       notused% = RegisterCallback("CALLBACK","DISTSIZEINSTALLCB")
  1652.       '** AUTOMATE: comment out next line and explicitly set directory,
  1653.       '**           if you are not happy with the default
  1654.       '**       dirSym$ = Reg_GetDirSymbolList(1)
  1655.       '**       dirSym$ = GetListItem(dirSym$, 1)
  1656.       '**       SetSymbolValue dirSym$, "c:\foo\"
  1657.       '**       Lot_RefreshDestination(dirSym$)
  1658.       direction$ = PopupModalDlg (DB_CHOOSEPATHDIST, DB_CHOOSEPATHDIST)
  1659.  
  1660.  
  1661.       IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
  1662. END IF
  1663.       
  1664.       dirSym$ = Reg_GetDirSymbolList(1)
  1665.       nDirs% = GetListLength(dirSym$)
  1666.       IF nDirs% > 0 THEN
  1667.     dirSym$  = GetListItem(dirSym$, 1)
  1668.     destdir$ = GetSymbolValue(dirSym$)
  1669.     AddSectionFilesToCopyList gDISTRIBUTIONFILES$,_
  1670.                 GetSymbolValue(SYM_STF_SRCDIR$),_
  1671.                 destdir$
  1672.       END IF
  1673.  
  1674.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1675.  
  1676.  
  1677.       IF automation$ = gTRUE$ THEN
  1678.    notused% = AutoCheckForSpace()
  1679.       ELSE      
  1680.         IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO ChangeDistPath
  1681.       END IF
  1682.  
  1683.       '' These UI Pops have a funny interaction with CheckFOrSpace
  1684.       '' When Check for SPace putsup a dialog.  (DAVE LOOK AT)
  1685.  
  1686.       '** Ask the user if we should copy files
  1687.       notused% = Lot_AutoWriteOutDebugFile()
  1688.  
  1689.       direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
  1690.       IF direction$ = gBACK$ GOTO ChangeDistPath
  1691.  
  1692.       '*****AUTOMATIONCODE********************************
  1693.       '*** Precopy Config processor
  1694.  
  1695.       '** Configuration before copying
  1696.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1697.  
  1698.       '** Copy the distribution files
  1699.       longnotused& = SetSizeCheckMode(CLNG(0))
  1700.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1701.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1702.       END IF
  1703.  
  1704.       nbytes& = NumberOfBytesPerBillbd()
  1705.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1706.       CopyFilesInCopyList
  1707.  
  1708.       ' ** TV:
  1709.       'notused1$ = Lot_CallProductFunctions("PostCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1710.  
  1711.       '** Tell the user you are done
  1712.       rc$ = PopupModalDlg (DB_SUCCESS, DB_SUCCESS)
  1713.    
  1714.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1715.  
  1716.    '********************* END OF INSTALL CASES ***************************
  1717.  
  1718.    '** IF you get here then it is an error
  1719.    CASE ELSE
  1720.       
  1721.       ERROR STFQUIT
  1722.  
  1723.    END SELECT
  1724.  
  1725.    IF automation$ = gTRUE$ THEN
  1726.       '** TV:Clean up dialogs before quitting 
  1727.       UIPopAll
  1728.       WriteToFile gLogFile$, LdString(SID_AUTOINST_COMPLETE)
  1729.       WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
  1730.       END 
  1731.    END IF
  1732. '*************************************************************************
  1733. '********************** ERROR HANDLERS ***********************************
  1734. '*************************************************************************
  1735.  
  1736. '** If major error, this will exit the program
  1737. MAINERROR:
  1738.    '** TV:Clean up dialogs before quitting 
  1739.    UIPopAll
  1740.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  1741.       WriteToFile gLogFile$, LdString(SID_AUTOINST_ERR)
  1742.       WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
  1743.    END IF   
  1744.    END
  1745.  
  1746. '** DND: Should we do anything else here?
  1747. STFERR_:
  1748.    RESUME NEXT
  1749.  
  1750. STFTOGGLEERR:
  1751.    RESUME NEXT
  1752.  
  1753. END SUB
  1754.  
  1755.  
  1756.  
  1757. '*************************************************************************
  1758. '** FUNCTION DoDatalens(direction$) AS STRING
  1759. '** Purpose:   Take care of all the datalens stuff
  1760. '**     
  1761. '**     
  1762. '** Author:    DND and MMETH
  1763. '** Arguments: SYM_NETWORK$
  1764. '**     
  1765. '** Returns: gBACK$ or ""
  1766. '**     
  1767. '*************************************************************************
  1768.  
  1769. FUNCTION DoDatalens(BYVAL direction$) AS STRING
  1770.  
  1771.     DIM notused%, rc$, chptname$ 
  1772.    If direction$ = gBACK Then GOTO PARADOXUI
  1773. %rem
  1774. 'This is left over from CARMEN
  1775.    IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  1776.  
  1777.       '** For COMPLETE installs, remove some datalens stuff from
  1778.       '** the copylist.
  1779.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
  1780.     If (CINT(FIsKeywordinCopyList ("SHRPARADOXPRG")) <> FALSE) Then   
  1781.         chptname$ =  Lot_GetChapterFromKeyword("SHRPARADOXPRG")
  1782.         Lot_ToggleChapterFilesInCopyList chptname$              
  1783.     end if 
  1784.     If (CINT(FIsKeywordinCopyList ("SHRSQLPRG")) <> FALSE) Then 
  1785.         chptname$ =  Lot_GetChapterFromKeyword("SHRSQLPRG")
  1786.         Lot_ToggleChapterFilesInCopyList chptname$              
  1787.     end if 
  1788.     If (CINT(FIsKeywordinCopyList ("SHRINFORMIXPRG")) <> FALSE) Then
  1789.         chptname$ =  Lot_GetChapterFromKeyword("SHRINFORMIXPRG")
  1790.         Lot_ToggleChapterFilesInCopyList chptname$              
  1791.     end if 
  1792.     If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
  1793.         chptname$ =  Lot_GetChapterFromKeyword("SHRIBMPRG")
  1794.         Lot_ToggleChapterFilesInCopyList chptname$              
  1795.     end if 
  1796.     If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
  1797.         chptname$ =  Lot_GetChapterFromKeyword("SHRIBMPRG")
  1798.         Lot_ToggleChapterFilesInCopyList chptname$              
  1799.     end if 
  1800.        
  1801.       END IF
  1802.  
  1803.    END IF
  1804. %endrem
  1805.  
  1806.    '************** Standard SQL Server Dialog *************************
  1807.  
  1808. SQLUI:
  1809.  
  1810.    IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE THEN
  1811.  
  1812.     '** INSYMBOLS: ????
  1813.  
  1814.     notused% = RegisterCallback("SHARE", "SQLSERVERNAMECB")
  1815.     '** AUTOMATE: comment out next line and explicitly set SYM_SQLSERVERNAME$
  1816.          IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  1817.             SetSymbolValue SYM_SQLSERVERNAME$, GetSymbolValue(SYM_AUTO_SQLSERVER)
  1818.          END IF
  1819.        direction$ = PopupModalDlg (DBM_SQL_SERVER_NAME, DBM_SQL_SERVER_NAME)
  1820.  
  1821.     IF direction$ = gBACK$ THEN
  1822.        DoDatalens = direction$
  1823.        EXIT FUNCTION
  1824.     END IF
  1825.    END IF
  1826.  
  1827.    '************** Standard Paradox Dialog ***************************
  1828. PARADOXUI:
  1829.  
  1830.    IF Lot_CallSharedTool("Lot_IsParadoxSelected()") <> FALSE THEN
  1831.  
  1832.     '** INSYMBOLS: ????
  1833.       
  1834.     notused% = RegisterCallback("SHARE", "PARADOXNETWORKINFOCB")
  1835.     '** AUTOMATE: comment out next line and explicitly set SYM_PARADOXNETWORKINFO$
  1836.          IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  1837.        SetSymbolValue SYM_PARADOXNETWORKINFO$, GetSymbolValue(SYM_AUTO_PARADOXINFO$)
  1838.          END IF
  1839.  
  1840.     direction$ = PopupModalDlg (DBM_PARADOX_NETWORK_INFORMATION, DBM_PARADOX_NETWORK_INFORMATION )
  1841.  
  1842.     '** OUTSYMBOLS: ????
  1843.  
  1844.     IF direction$ = gBACK$ THEN
  1845.        IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE GOTO SQLUI
  1846.        DoDatalens = gBACK$
  1847.        EXIT FUNCTION
  1848.     END IF
  1849.    END IF
  1850.  
  1851.    DoDatalens = direction$
  1852.    
  1853. END FUNCTION
  1854.  
  1855.  
  1856. '*************************************************************************
  1857. '** FUNCTION NumberOfBytesPerBillbd() AS LONG
  1858. '** Purpose:   Take care of all the datalens stuff
  1859. '**     
  1860. '**     
  1861. '** Author:    MMETH
  1862. '** Arguments: NONE
  1863. '**     
  1864. '** Returns: number of bytes per billboard
  1865. '**     
  1866. '*************************************************************************
  1867.  
  1868. FUNCTION NumberOfBytesPerBillbd() AS LONG
  1869.    DIM   n%, i% ,j%, costs&, nBillboards%, nProducts%, UNCSym$
  1870.  
  1871.    ''**** COMPUTE THE number of bytes for each billboard to stay up
  1872.    costs& = LcbGetChapterCost("", "", SYM_COST$, "")
  1873.    n% = GetListLength(SYM_COST$)
  1874.    costs& = 0
  1875.    for i% = 1 to n%
  1876.       costs& = costs& + CLNG(GetListItem(SYM_COST$, i%))
  1877.    next
  1878.    j%=GetListLength("UNCVOLLIST")
  1879.    FOR i% = 1 to j%
  1880.       UNCSym$ = GetListItem("UNCVOLLIST",i%)
  1881.       costs& = costs& + CLNG(GetListItem(UNCSym$, UNC_COST))
  1882.    NEXT
  1883.    nProducts% = Reg_GetNumberOfProducts()
  1884.    nBillboards% = Reg_GetBillboardNumber(1)
  1885.    If nBillboards% = 0 Then
  1886.       NumberOfBytesPerBillbd = 0
  1887.    Else
  1888.       NumberOfBytesPerBillbd = costs&\nBillboards%
  1889.    End If
  1890.  
  1891. END FUNCTION
  1892.  
  1893.  
  1894. '*************************************************************************
  1895. SUB SetTheBaseSymbol()
  1896. '** IN SYMBOLS ::: SYM_NETWORK$
  1897. '** OUT SYMBOLS::: SYM_BASEDIR$, SYM_PARENTDIR$
  1898. '*************************************************************************
  1899. DIM network$, defBase$, lcbSpace&, defDir$, i%, nProducts%, spaceneeded&
  1900. DIM autobase$
  1901. DIM keyvalue$, gbuf$, nsize&, ret&, bRegistryPath%
  1902.  
  1903.     bRegistryPath% = FALSE
  1904.    network$ = GetSymbolValue(SYM_NETWORK$)
  1905.    IF network$ = gSERVER$ THEN
  1906.       defBase$ = "lotus\"
  1907.    ELSEIF network$ = gDISTRIBUTION$ THEN
  1908.       defBase$ = "lotus\"
  1909.    ELSE
  1910.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1911.     defBase$ = ""
  1912.       ELSE
  1913.     defBase$ = "lotus\"
  1914.       END IF
  1915.    END IF
  1916.  
  1917.    '** Set the ALTERNATE BASE DIRECTORY based on minimum space required
  1918.    lcbSpace& = 0
  1919.    nProducts% = Reg_GetNumberOfProducts()
  1920.    FOR i% = 1 to nProducts%
  1921.      lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
  1922.    NEXT
  1923.    defDir$ = Lot_GetAllHardDrive(lcbSpace&, defBase$)
  1924.    IF defDir$ = "" THEN 
  1925.      defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
  1926.    END IF
  1927.    SetSymbolValue SYM_BASE16DIR$, defDir$
  1928.    network$ = GetSymbolValue(SYM_NETWORK$)
  1929.    IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN
  1930.      '** Find out if there's already installed products by querying registry
  1931.      keyvalue$ = "LocalPath"
  1932.      ret& =  Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, gREGLOTUSCOMP, keyvalue$, 0, gbuf$, nsize&) 
  1933.    END IF
  1934.    nsize& = 0
  1935.    IF gbuf$ <> "" AND IsDriveMapped(gbuf$) <> FALSE THEN
  1936.      nsize& = INSTR(gbuf$,"compnent")
  1937.      IF nsize& <> 0 THEN
  1938.        defdir$ = LEFT$(gbuf, nsize&-1)
  1939.        bRegistryPath% = TRUE
  1940.      END IF
  1941.    END IF  
  1942.    '*** AUTOMATION****************************************
  1943.   IF bRegistryPath% <> TRUE THEN
  1944.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
  1945.       GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1946.       autobase$ = Lot_AutoGetBaseDirSymbol()
  1947.       IF autobase$ <> "" THEN
  1948.        defDir$ = autobase$
  1949.       ELSE  
  1950.        'ErrorMsg "Base Directory entry Invalid"
  1951.        ErrorMsg SID_ERR_SETSYMBOLVALUE, LdString(SID_ERR_AUTO_BASEDIR) + "SUIT" 
  1952.        ERROR STFQUIT
  1953.       END IF
  1954.    END IF   
  1955.   END IF   
  1956.    SetSymbolValue SYM_BASEDIR$, defDir$
  1957.    SetSymbolValue SYM_PARENTDIR$, defDir$ 
  1958.  
  1959.    '** Set the PARENT DIRECTORY based on minimum space required
  1960.     '** if not already gotten from registry
  1961.     IF    bRegistryPath% = FALSE THEN
  1962.         lcbSpace& = 0
  1963.         defBase$ = "lotus\"
  1964.         FOR i% = 1 to nProducts%
  1965.             lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
  1966.         NEXT
  1967.         defDir$ = Lot_GetAllHardDrive(lcbSpace&, defBase$)
  1968.         IF defDir$ = "" THEN 
  1969.             defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
  1970.         END IF
  1971.         SetSymbolValue SYM_PARENTDIR$, defDir$ 
  1972.     END IF
  1973.  
  1974.    '*** AUTOMATION****************************************
  1975.   IF bRegistryPath% <> TRUE THEN
  1976.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
  1977.       GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1978.           AutoSetParentDir
  1979.    END IF   
  1980.   END IF   
  1981.  
  1982. END SUB
  1983.  
  1984. SUB GetNamesFromRegistry(buf1$, buf2$, RegLoc$)
  1985.    DIM ReturnVal&
  1986.    
  1987.    buf1$=CreateBuffer(260)
  1988.    ReturnVal&=260
  1989.    ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1990.              RegLoc$, gREGUSERNAME, 0, buf1$, ReturnVal&)
  1991.    buf2$=CreateBuffer(260)
  1992.    ReturnVal&=260
  1993.    ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1994.              RegLoc$, gREGORGNAME, 0, buf2$, ReturnVal&)
  1995.    buf1$ = LTrim$(NullTrim(buf1$))
  1996.    buf1$ = Trim$(buf1$)
  1997.    buf2$ = LTrim$(NullTrim(buf2$))
  1998.    buf2$ = Trim$(buf2$)
  1999. END SUB
  2000.  
  2001. SUB InitInstall
  2002.    DIM hUser&, notused%
  2003.    DIM buf1 AS STRING : buf1$ = CreateBuffer(80)
  2004.    DIM buf2 AS STRING : buf2$ = CreateBuffer(80)
  2005.    DIM count%, network$,ReturnVal&
  2006.  
  2007.    '** Initialize the Setup API
  2008.    '-- SetUpAPI  moved to toolkit
  2009.  
  2010.    '****************************************
  2011.    '******* INITIALIZE ALL GLOBAL SYMBOLS **
  2012.    '****************************************
  2013.  
  2014.    '** Default is Single, SmartSuite will override if it is present
  2015.    '** Even for single product installs there may be more that one
  2016.    SetSymbolValue SYM_SINGLESMARTSUITE, gSINGLE$
  2017.  
  2018.    '** Set up a symbol for where the copylist log will get written
  2019.    IF ENVIRON$(gLOTUS_COPYLIST$) <> "" THEN
  2020.       SetSymbolValue SYM_LOGFILE$, GetWindowsDir() + gCOPYLISTLOG$
  2021.    END IF
  2022.  
  2023.    '** Initialize the Win and Winsys symbols
  2024.    Lot_InitializeWinWinsysSym
  2025.  
  2026.    '** Initialize the expected len of subdirs in *.inf paths
  2027.    SetSymbolValue SYM_DOSMAXPATHDIFF$,"20"
  2028.  
  2029.    '** Initialize the gEXTRA list to allow for fudge
  2030.    '** on the windows drive. A deseprate application can add to it.
  2031.    Lot_InitializeEXTRA 
  2032.  
  2033.    ''We show bitmaps in 3 ways, with transparent backrgound (default), streched or centred
  2034.    SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  2035.  
  2036.    '** Get The default Name & Company
  2037.    hUser& = GetModuleHandle(gUSER$)
  2038.    notused% = LoadString (hUser&, USERNAME,    buf1$, 80)
  2039.    notused% = LoadString (hUser&, COMPANYNAME, buf2$, 80)
  2040.  
  2041.    buf1$ = LTrim$(NullTrim(buf1$))
  2042.    buf1$ = Trim$(buf1$)
  2043.    buf2$ = LTrim$(NullTrim(buf2$))
  2044.    buf2$ = Trim$(buf2$)
  2045.  
  2046.    IF buf1$="" THEN
  2047.       GetNamesFromRegistry buf1$, buf2$, gREGWINNAME
  2048.       IF buf1$="" THEN
  2049.          GetNamesFromRegistry buf1$, buf2$, gREGWINNTNAME
  2050.          IF buf1$="" THEN
  2051.             buf1$=CreateBuffer(260)
  2052.             ReturnVal&=260
  2053.             notused%=GetUserName(buf1$,ReturnVal&)
  2054.             buf1$=NullTrim(buf1$)
  2055.             buf2$=buf1$
  2056.          END IF
  2057.       END IF
  2058.    END IF
  2059.  
  2060.    SetSymbolValue SYM_NAME$,    RTrim$(NullTrim(buf1$))
  2061.    SetSymbolValue SYM_COMPANY$, RTrim$(NullTrim(buf2$))
  2062.  
  2063. '***********AUTOMATION code*************************************************
  2064.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = "1" THEN
  2065.       SetSymbolValue SYM_AUTOMATIONINST$, gTRUE$
  2066.         '*** default must be lotinst.log for automation, set in cmdline processing
  2067.      '*** gLogFile$ = GetWindowsDir() + "lotinst.log"
  2068.    ELSE
  2069.           SetSymbolValue SYM_AUTOMATIONINST$, gFALSE$
  2070.    END IF
  2071.       
  2072.    IF GetSymbolValue(SYM_LOGGING$) = "1" THEN
  2073.       IF GetSymbolValue(SYM_LOGGINGPATH$) <> "" THEN
  2074.           gLogFile$ = GetSymbolValue(SYM_LOGGINGPATH$)
  2075.       END IF
  2076.    END IF
  2077.  
  2078.    '** Check to see if command line asks for Node Install
  2079.    '** TV: This should be independent of automation
  2080.    IF INSTR(UCASE$(COMMAND$), "/N") <> 0 THEN
  2081.       SetSymbolValue SYM_NETWORK$, gNODE$
  2082.    ELSE 
  2083.      IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  2084.    network$ = Lot_AutoGetInstallType()
  2085.    SetSymbolValue SYM_NETWORK$, network$
  2086.      ELSE
  2087.    SetSymbolValue SYM_NETWORK$, gSTANDARD$
  2088.      END IF     
  2089.    END IF
  2090.  
  2091.  
  2092.    '****************************************
  2093.    '******* MISC TRIVIA (Initializing) *****
  2094.    '****************************************
  2095.  
  2096.    '** Even though a Window title is not shown, we need
  2097.    '**  to set the title, so it shows up in the task list.
  2098.    SetTitle LdString(SID_TKT_STD_TITLE)
  2099.  
  2100.    '** The default location of the copy gauge is centered at screen bottom
  2101.    SetCopyGaugePosition -1,32000
  2102.  
  2103. END SUB
  2104.  
  2105. '*************************************************************************
  2106. '** SUB ConfigureAUTOEXEC
  2107. '**
  2108. '** Purpose: Configure AUTOEXEC.BAT after copying files.
  2109. '**            
  2110. '** Author:    CHRISTOPHER MOY
  2111. '** Arguments: None
  2112. '** Returns:   NONE
  2113. '*************************************************************************
  2114. SUB ConfigureAUTOEXEC
  2115.    DIM n%, i%, notused%, notused1$, rc$
  2116.    DIM hwnd%, lr%
  2117.  
  2118. '** DETERMINE IF AUTOEXEC.BAT NEEDS MODIFICATIONS
  2119. SetSymbolValue SYM_NEEDSHARE$, gFALSE$   
  2120. SetSymbolValue SYM_NEEDNOTES$, gFALSE$    
  2121.  
  2122. '**** Win32 does not require autoexec modifictaion *********
  2123. %rem
  2124.  
  2125. n% = Reg_GetNumberOfProducts()
  2126.  
  2127. FOR i% = 1 to n%
  2128.    IF Reg_GetSHAREEXESupport(i%) <> FALSE THEN
  2129. '**      IF IsShareInAUTOEXEC() = FALSE THEN  '** if share is not in autoexec   
  2130. '**         SetSymbolValue SYM_NEEDSHARE$, gTRUE$   '** use symbols?
  2131. '**         EXIT FOR
  2132. '**      ELSE
  2133.       IF IsShareInstalled() = FALSE THEN '**if share is in autoexec
  2134.     SetSymbolValue SYM_NEEDSHARE$, gTRUE$    '**but not running.
  2135.     EXIT FOR
  2136.       END IF
  2137.    END IF
  2138. NEXT
  2139.  
  2140. FOR i% = 1 to n%
  2141.    IF Reg_GetNotesSupport(i%) <> FALSE THEN
  2142.       IF IsNotesInPath() = FALSE THEN
  2143.     SetSymbolValue SYM_NEEDNOTES$, gTRUE$    '** use symbols? 
  2144.     EXIT FOR
  2145.       END IF
  2146.    END IF
  2147. NEXT
  2148.  
  2149. IF GetSymbolValue(SYM_NEEDSHARE$) = gTRUE$ OR GetSymbolValue(SYM_NEEDNOTES$) = gTRUE$ THEN
  2150.   IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  2151.       notused% = RegisterCallback("CALLBACK", "AUTOEXECCB")
  2152.       notused1$ = PopupModalDlg(DB_AUTOEXEC, DB_AUTOEXEC)
  2153.  
  2154.       '** Get value in SYM_AUTOEXEC_CHOICE$ from button
  2155.       '** pressed in DB_AUTOEXEC dialog.
  2156.       notused% = RegisterCallback("CALLBACK", "INSTALLCOMPLETECB")
  2157.  
  2158.       SELECT CASE GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
  2159.  
  2160.          CASE "AUTO"
  2161.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTO, DB_SUCCESS_AUTO)
  2162.  
  2163.          CASE "AUTOCOPY"   
  2164.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTOCOPY, DB_SUCCESS_AUTOCOPY)
  2165.  
  2166.          CASE "MAN"
  2167.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTOMAN, DB_SUCCESS_AUTOMAN)
  2168.  
  2169.    END SELECT
  2170.   ELSE
  2171.    notused% = Lot_AutoConfigureAutoexec()
  2172.         '** Tell the user we are all done
  2173.       rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
  2174.   END IF
  2175.  
  2176. ELSE
  2177.    '** Tell the user we are all done
  2178.    rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
  2179.  
  2180. END IF
  2181.  
  2182. %endrem
  2183. '**** Win32 does not require autoexec modifictaion *********
  2184.  
  2185.    '** Tell the user we are all done
  2186.    
  2187.    IF ExitExecRestart=FALSE THEN
  2188.       rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
  2189.       IF rc$="OK"  THEN
  2190.          hwnd%=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  2191.          lr%=SendMessage(hwnd%, WM_COMMAND, UM_REBOOTFLAG, 0)
  2192.       END IF
  2193.    ELSE
  2194.    
  2195.       rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
  2196.       
  2197.    END IF      
  2198.  
  2199.  
  2200. END SUB
  2201.  
  2202.  
  2203.  
  2204.